package org.apache.harmony.javax.security.sasl;

import java.io.IOException;

public class SaslException extends IOException
{
  private static final long serialVersionUID = -1859465078L;
  private Throwable _exception;

  public SaslException(String paramString)
  {
    super(paramString);
  }

  public SaslException(String paramString, Throwable paramThrowable)
  {
    super(paramString);
    if (paramThrowable != null)
    {
      super.initCause(paramThrowable);
      this._exception = paramThrowable;
    }
  }

  public Throwable getCause()
  {
    return this._exception;
  }

  public Throwable initCause(Throwable paramThrowable)
  {
    super.initCause(paramThrowable);
    this._exception = paramThrowable;
    return this;
  }

  public String toString()
  {
    String str;
    if (this._exception == null)
      str = super.toString();
    while (true)
    {
      return str;
      StringBuilder localStringBuilder = new StringBuilder(super.toString());
      localStringBuilder.append(", caused by: ");
      localStringBuilder.append(this._exception.toString());
      str = localStringBuilder.toString();
    }
  }
}